package com.example.eurekaclient.utils;

public class ResponseResultUtil {

    public static ResponseResult success(){
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(1);
        return responseResult;
    }

    public static ResponseResult successs(Object obj){
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(1);
        responseResult.setData(JacksonUtil.bean2Json(obj));
        return responseResult;
    }

    public static ResponseResult fail(String msg){
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(0);
        responseResult.setMsg(msg);
        return responseResult;
    }
}
